package com.slliver.productservice.dubbo.provider;

import com.slliver.commonmodel.product.Product;
import com.slliver.dubboservice.api.ProductServiceApi;
import org.apache.dubbo.config.annotation.Service;

import java.math.BigDecimal;

@Service(version = "1.0.0")
public class ProductServiceApiProvider implements ProductServiceApi {

    @Override
    public Product getProductById(Long productId) {
        Product product = new Product();
        product.setId(productId);
        product.setProductName("机器猫的盲盒");
        product.setPrice(new BigDecimal("40.5"));
        product.setNum(1);
        product.setDesc("这个是dubbo的商品描述");
        return product;
    }
}
